<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/22 0022
 * Time: 8:48
 */

namespace Cohuna\Controllers;


use Cohuna\Services\PayService;
use Phalcon\Mvc\Controller;

class PayController extends Controller
{
    public function indexAction()
    {
        $format = trim($this->request->getQuery('format'));
        //如果提交的是json数据
        if($format === 'json'){
            $content = file_get_contents('php://input');
            $params = json_decode($content,true);
            if($result = PayService::checkCommonParams($params) !== true){
                return $this->response->setJsonContent($result)->send();
            }

        }else{

        }


    }



}